script plugin: problem running ([Errno 13] Permission denied) 路 Issue #796 路 ansible/awx 您所在的位置:网站首页 ansible permission denied script plugin: problem running ([Errno 13] Permission denied) 路 Issue #796 路 ansible/awx

script plugin: problem running ([Errno 13] Permission denied) 路 Issue #796 路 ansible/awx

2023-12-30 21:04| 来源: 网络整理| 查看: 265

ISSUE TYPE Bug Report SUMMARY

Permission denied while using the python inventory script for building dynamic inventories in AWX tower

ENVIRONMENT AWX version: AWX 19.5.0 Operator version: quay.io/ansible/awx-operator:0.15.0 Kubernetes version: v1.19.1 AWX install method: (https://github.com/ansible/awx-operator/blob/devel/awx-demo.yml) STEPS TO REPRODUCE

Create AWX operator in kubernetes Create AWXs Add project and git credentials Add Inventory Add source as "Sourced from a Project" Provide inventory source path from the git repo Sync the resource Add execution environment - https://github.com/ansible/ansible-runner quay.io/ansible/ansible-runner:latest - docker image

EXPECTED RESULTS

Inventories should be built from the python script

ACTUAL RESULTS

Getting permission denied for the python script and the inventory plugin is getting defaulted to ini instead of script as we are getting permission denied When an automation job pod is getting created, the file copied from source doesnt have execute permissions. We have also provided privileged: true but still it doesn't work

Let me know how to add inventory scripts with execute permissions so that the automation job will run and create proper dynamic inventories

ADDITIONAL INFORMATION

ansible-inventory [core 2.12.2] config file = /runner/project/ansible.cfg configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.8/site-packages/ansible ansible collection location = /runner/requirements_collections:/home/runner/.ansible/collections:/usr/share/ansible/collections:/usr/share/automation-controller/collections executable location = /usr/local/bin/ansible-inventory python version = 3.8.12 (default, Sep 21 2021, 00:10:52) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] jinja version = 2.10.3 libyaml = True Using /runner/project/ansible.cfg as config file setting up inventory plugins host_list declined parsing /runner/project/rheva/tower_inventory.py as it did not pass its verify_file() method auto declined parsing /runner/project/rheva/tower_inventory.py as it did not pass its verify_file() method yaml declined parsing /runner/project/rheva/tower_inventory.py as it did not pass its verify_file() method toml declined parsing /runner/project/rheva/tower_inventory.py as it did not pass its verify_file() method [WARNING]: * Failed to parse /runner/project/rheva/tower_inventory.py with script plugin: problem running /runner/project/rheva/tower_inventory.py --list ([Errno 13] Permission denied: '/runner/project/rheva/tower_inventory.py') File "/usr/local/lib/python3.8/site-packages/ansible/inventory/manager.py", line 290, in parse_source plugin.parse(self._inventory, self._loader, source, cache=cache) File "/usr/local/lib/python3.8/site-packages/ansible/plugins/inventory/script.py", line 150, in parse raise AnsibleParserError(to_native(e)) [WARNING]: * Failed to parse /runner/project/rheva/tower_inventory.py with ini plugin: /runner/project/rheva/tower_inventory.py:3: Expected key=value host variable assignment, got: os File "/usr/local/lib/python3.8/site-packages/ansible/inventory/manager.py", line 290, in parse_source plugin.parse(self._inventory, self._loader, source, cache=cache) File "/usr/local/lib/python3.8/site-packages/ansible/plugins/inventory/ini.py", line 136, in parse raise AnsibleParserError(e) [WARNING]: Unable to parse /runner/project/rheva/tower_inventory.py as an inventory source ERROR! No inventory was parsed, please check your configuration and options.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有